package cn.team.service.impl;
import cn.team.entity.Applay;
import cn.team.mapper.ApplayMapper;
import cn.team.service.ApplayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ApplayServiceImpl implements ApplayService {

    @Autowired
    private ApplayMapper applayMapper;

    @Override
    public int insertApplay(Applay applay) {
        return applayMapper.insertApplay(applay);
    }

    @Override
    public int deleteByTutorAndId(Integer id, String tutor) {
        return applayMapper.deleteByTutorAndId(id, tutor);
    }

    @Override
    public int deleteByParentAndId(Integer id, String parent) {
        return applayMapper.deleteByParentAndId(id, parent);
    }

    @Override
    public List<Applay> selectByOid(Integer oid) {
        return applayMapper.selectByOid(oid);
    }

    @Override
    public List<Applay> selectByParentAndStartDateAfterNow(String parent) {
        return applayMapper.selectByParentAndStartDateAfterNow(parent);
    }

    @Override
    public List<Applay> selectByTutorAndStartDateAfterNow(String tutor) {
        return applayMapper.selectByTutorAndStartDateAfterNow(tutor);
    }

    @Override
    public Applay selectByOidAndTutor(Integer id,String tutor) {
        return applayMapper.selectByOidAndTutor(id,tutor);
    }

    @Override
    public int applaySuccess(String grade, int oid,String tutor) {
        return applayMapper.applaySuccess(grade,oid,tutor);
    }

    @Override
    public int applayFail(int oid, String tutor) {
        return applayMapper.applayFail(oid,tutor);
    }

    @Override
    public int quXiaoRenwu(int oid) {
        return applayMapper.quXiaoRenwu(oid);
    }
}
